-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.0 Rewrite #229
base: master
Are you sure you want to change the base?
2.0 Rewrite #229
Conversation
* form-for * input control * textarea control Controls have label and helpers
eae5ddd
to
5191598
Compare
Any idea when this will be merged in / released ? |
@Trevoke it is blocked by some things I need / want to get into ember-cli's build system. Specifically, I want ember-easy-form to be able to "discover" any form-controls that are available and then dynamically create the component template hash as a pre-compile step. In order to do this the way ember-cli is building its assets need to change. I have an early version of the RFC for this here: https://github.com/ember-cli/rfcs/pull/82/files There are other major benefits to ember-cli exposing the pre-compiled asset graph as a single tree rather than its current piece-meal approach. So I'm hoping to win over some hearts and minds to get this on the roadmap. tldr; not anytime soon :( |
I've been looking at the existing form solutions, and I'm really curious as to what these differences are or what you feel form-for is lacking. Are there parts of it that don't align with current Ember paradigms? |
@k-fish this isn't remotely ready. I am blocked on some upstream changes in ember-cli. If you are looking for something today you should go with form-for |
Ah no, I wasn't under the impression that it was ready, I'm just interested in your opinion on form-for 😄 and what the philosophical differences are, considering I was thinking of using it. |
This rewrite represents a few years of pain and suffering finally being overcome!
Unfortunately this will be a major API change and the upgrade path is not yet obvious. Considering that 1.x relied so heavily on private APIs I don't know if we can even support a clean upgrade path from Ember < 1.10 apps.
This rewrite will require Ember >= 2.10 positional params bug which wasn't fixed until 2.10 (see: emberjs/ember.js#14533)
The goals for this rewrite are:
f.submit
with anember-async-button
we'll support an API to addf.async-submit
or something like that. Want to use ember-power-select? Great, an API hook will be provided and now you'll have{{f.power-select "country" options=countries}}
required
,pattern
, etc... as we still believe that the validations should be represented in the data model and not in the form. This will reduce a lot of code and solve a lot of bikeshedding around how best to display errors. Styling will required eval of the constraint psuedo classes as well as any other custom styling the browser permits. This library will not attempt to apply classes or states to the controls for validation state.As a note, credit should be given to @martndemus's ember-form-for as I believe it is currently the most complete solution in the market. There are some philosophical differences that motivated me to resurrect
easy-form
over contributing toform-for
, but for many use-casesform-for
should be a great solution. It is still not clear if 2.x ofeasy-form
is a good idea and this PR should, for the time being, be seen as a complete experimental branch and not relied upon for anyone's app until otherwise stated.